import { defineUserConfig } from 'vuepress'
import { DefaultThemeOptions } from 'vuepress'
import recoTheme from 'vuepress-theme-reco'
import { navbar } from './config/navbar'
import { sidebar } from './config/sidebar.js';

import { path } from '@vuepress/utils'

export default defineUserConfig({
    title: 'hhのBlog',
    description: 'A blog about work and life',
    base: "/blog/",
    theme: recoTheme({
        password: '6f7a45c426e4922b723da60b0c4c9cb7',//dlp
        autoSetSeries: true,
        // autoSetBlogCategories: true,         // 自动设置分类
        // autoAddCategoryToNavbar: true,
        dest:'dist',
        style: '@vuepress-reco/style-default',
        logo: '/images/logo.png',
        authorAvatar: '/images/logo.png',
        author: 'hh',
        startYear:'2022',
        docsRepo: 'https://gitee.com/i77ing/blog.git',
        docsBranch: 'master',
        lastUpdatedText: '',
        // series 为原 sidebar
        series:sidebar,
        navbar: navbar,
        tags:"/tags",
        subSidebar:'auto',
        plugins: [
            [ '@vuepress-reco/vuepress-plugin-kan-ban-niang',
                {
                    theme: ['blackCat', 'whiteCat', 'haru1', 'haru2', 'haruto', 'koharu', 'izumi', 'shizuku', 'wanko', 'miku', 'z16']
                }]
        ],
        bulletin: {
            body: [
                {type: 'text',content: `今天也要保持好心情 好好努力工作哦~`,style: 'font-size: 12px;'},
            ],
        },
        // valineConfig 配置与 1.x 一致
        // valineConfig: {
        //   appId: 'xxx',
        //   appKey: 'xxx',
        //   placeholder: '填写邮箱可以收到回复提醒哦！',
        //   verify: true, // 验证码服务
        //   // notify: true,
        //   recordIP: true,
        //   // hideComments: true // 隐藏评论
        // },
    }),
    debug: true,
    head: [
        //网页标签栏图标
        ['link', { rel: 'icon', href: '/blog/images/logo.png' }],
        // ['link', { rel: 'icon', href: '/blog/images/favicon.ico' }],
        ['link', { rel: 'stylesheet', href: '/blog/css/common.scss' }],
        // 移动栏优化
        ['meta', { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no' }],
        // 引入jquery
        ["script", {
            "language": "javascript",
            "type": "text/javascript",
            "src": "/blog/js/jquery.min.js",
        }],
        // 引入鼠标点击脚本
        // ["script", {
        //     "language": "javascript",
        //     "type": "text/javascript",
        //     "src": "/blog/js/MouseClickEffect.js"
        // }]
    ]
})
